<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="style/style.css"></link>
    <style type="text/css">

        #content div{
            margin: 10px 0px;
        }

        div.submit{
            text-align:center;
        }

        label{
            width:80px;
            display:block;
            float:left;
        }

        fieldset{
            width:300px;
            margin:auto;
            margin-top:20px;
            display:block;
        }

        fieldset select{
            width:120px;
        }

        fieldset input{
            width:120px;
        }

    </style>
    <title>会员中心</title>
</head>
<body>
<div id="container">
    <div id="header">
        <ul>
            <li><a href="#">帮助</a></li>
        </ul>
    </div>
    <div id="menu">
        <ul>
            <li><a href="login.html">首页</a></li>
            <li><a href="roomPrice.html">设施与价格</a></li>
            <li><a href="memberCenter.php">会员中心</a></li>
            <li><?php echo isset($_COOKIE['username']) ? $_COOKIE['username'] : '[未登录]'; ?></li>
            <li><a href="repassword.html">修改密码</a> </li>
            <li><a href="logout.php">退出登录</a> </li>
        </ul>
    </div>
    <div id="content">
        <h3>下面是您的客房预订信息</h3>
        <?php
        include "connect.php";
        $sql = "select * from subscription where m_id='".$_COOKIE['user_id']."'";
        $result = mysqli_query($link, $sql);

        if ($result) {
            if (mysqli_num_rows($result) > 0) {
                while ($row = mysqli_fetch_assoc($result)) {
                    echo "<p>预订ID: " . $row['ID'] . "</p>";
                    echo "<p>订单号：" . $row['No'] . "</p>";
                    echo "<p>联系人：" . $row['Linkman'] . "</p>";
                    echo "<p>Email地址：" . $row['Email'] . "</p>";
                    echo "<p>联系电话：" . $row['Phone'] . "</p>";
                    // 根据实际表结构输出其他字段
                }
            } else {
                echo "<p>您还没有任何预订信息。</p>";
            }
        } else {
            echo "查询失败: " . mysqli_error($link);
        }
        ?>
    </div>
    <hr />
    <div id="footer">
        <p>本系统做为教学设计使用。未经允许，不得做为它用，版权所有Allan<br />联系方式：media@live.cn</p>
    </div>
</div>
</body>
</html>